#include "ChapterReaderWriter.h"

ChapterAutoSaveManager::ChapterAutoSaveManager(std::string fileAddress, int autosave_interval)
    :AutoSaveManager(fileAddress,autosave_interval)
{
    if(fileAddress.length()>0)
        LoadFIle(fileAddress);
}

bool ChapterAutoSaveManager::LoadFIle(std::string fileAddress)
{
    return load_from_file(fileAddress);
}

bool ChapterAutoSaveManager::SaveFile(std::string fileAddress)
{
    if(fileAddress.length()<=0)
        return save_to_file(m_fileAddress_);
    else
        return save_to_file(fileAddress);
}


